﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TMS.Forms
{
    public partial class FrmChangeFriendlyName : DevExpress.XtraEditors.XtraForm
    {

        public string FriendlyName { get; private set; }

        public FrmChangeFriendlyName()
        {
            InitializeComponent();
        }

        public FrmChangeFriendlyName(string friendlyname) : this()
        {
            txtFriendlyName.Text = friendlyname;
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.OK;
            FriendlyName = txtFriendlyName.Text.Trim();
            Hide();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
            Hide();
        }

        private void FrmChangeFriendlyName_Load(object sender, EventArgs e)
        {

        }
    }
}